﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace StartMVC.Controllers
{
    public class MailLogController : BaseController
    {
        //
        // GET: /MailLog/

        public ActionResult Index()
        {
            var data = db.MailLogs.ToList();
            return View(data);
        }
        public ActionResult Details(int MailLogId)
        {
            var data = db.Members.Find(MailLogId);
            return View(data);
            //var iselect = from mail in db.MailLogs
            //              from member in db.Members
            //              where mail.Member.Id == member.Id
            //              select new
            //              {
            //                  SendTime = mail.SendTime,
            //                  IsSendOk = mail.IsSendOk,
            //                  Msg = mail.Msg,
            //                  Name = member.Name,
            //                  Nickname = member.Nickname,
            //                  RegisterOn = member.RegisterOn,
            //                  Email = member.Email
            //              };
            //var data = iselect.ToList();
            //return View(data);
        }


    }
}
